Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update views.py #4

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Update views.py #4

wants to merge 3 commits into from

Conversation

jerry1ye10
Copy link
Member

Updates view.py by adding all of the CMS endpoints which update, delete, and create both sections and articles. Endpoints are separated based on CRUD commands.

app/views.py Outdated
subsection = None) #remove this after section and subsection become part of the same model
db.session.add(article)
db.session.commit()
return jsonify({"status":"Section has been added"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should say Article

Fixed jsonify returns of create article endpoint and delete section, were returning inaccurate strings as the value in the dictionary return.
Fixed styling issues with CMS code such as renaming of function to get_section_by_id. Removes subsection as an attribute of the create_article endpoint, renamed endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants